<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>X5</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.2.0.css"/>
    <link rel="stylesheet" type="text/css" href="../css/aui_skin_night.css"/>
    <link rel="stylesheet" type="text/css" href="../css/common.css"/>
    <link rel="stylesheet" type="text/css" href="../css/style_dark.css"/>
    <style>
        .display-block {
            display: block;
        }

        .display-none {
            display: none;
        }

        .icon-svip {
            width: 20px;
            margin: -10px 10px 0 0;

            content: '';
            background: url() no-repeat;

            height: 20px;
            background-size: contain;
            display: inline-block;
            vertical-align: middle;
        }

        .tips {
            padding: 2px;
            display: inline-block;
            border-radius: 18px 18px 18px 0;
            color: #ff1679;
            text-align: center;
            font-size: 10px;
            top: 10px;
            line-height: 12px;
            background: #ffde22;
        }

    </style>

</head>
<body style="  background-color: #fff;">
<header class="aui-bar aui-bar-nav fix-statusbar" id="aaa" style="background: #1b7dff;">
    <a class="aui-pull-left" onclick="GoBack()">
        <span class="aui-iconfont aui-icon-left"></span>
    </a>
    <a class="aui-pull-left" onclick="GoPageWork('Close')">
        <span class="aui-iconfont aui-icon-close"></span>
    </a>

    <div class="aui-title" id="title" style="font-size: 15px;"><i class="icon-svip"></i> 影视特权</div>
    <!--
            <a id="GoPlay" class="display-block ">
                    <span   onclick="PlayButtonNav()"  class="aui-pull-right" style=" color: #fff; font-size:10px;margin-right: 5px;" >
                             <span class="aui-iconfont aui-icon-video"  style="margin-right: 5px;"></span>
                             换线 </span>
            </a>

                <a  id="GoTouPing" class="display-none "  onclick="Deliver()" >
                        <span class="aui-pull-right" style="  font-size:10px;margin-right: 5px;" >

                            <svg style=" font-size:10px;margin-right: 5px;font-weight: bold;" t="1576012225179" class="aui-iconfont" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2049" width="16" height="16"><path d="M853.015273 814.545455h-161.419637a34.909091 34.909091 0 0 1 0-69.818182h161.419637A54.690909 54.690909 0 0 0 907.636364 690.106182V264.075636A54.690909 54.690909 0 0 0 853.015273 209.454545H170.961455A54.667636 54.667636 0 0 0 116.363636 264.075636v426.030546A54.667636 54.667636 0 0 0 170.961455 744.727273h141.358545a34.909091 34.909091 0 0 1 0 69.818182H170.961455A124.555636 124.555636 0 0 1 46.545455 690.106182V264.075636A124.555636 124.555636 0 0 1 170.961455 139.636364h682.053818A124.578909 124.578909 0 0 1 977.454545 264.075636v426.030546A124.578909 124.578909 0 0 1 853.015273 814.545455zM674.909091 907.636364H349.090909l162.909091-209.454546 162.909091 209.454546z" fill="#ffffff" p-id="2050"></path></svg>

                                投屏	</span>
            </a>
    -->
</header>
<div class="display-block" id="Mobile_player"
     style="background-color: #1b7dff; margin: 15px; border-radius: 10px; color: #fff; box-shadow: 0 0.2rem 0.5rem 0 rgba(0, 0, 0, 0.1);margin-top: 280px;">
    <div class="aui-flex aui-flex-right-tv">

        <div class="aui-flex-box" onclick="ButtonEvent('Share')">
                       <span class="aui-live-icon-nav" style="font-size: 0.75rem;">
                            <i>
							<svg t="1570085605679" class="icon" viewBox="0 0 1024 1024" version="1.1"
                                 xmlns="http://www.w3.org/2000/svg" p-id="29883" width="64" height="64"><path
                                    d="M333.824 775.168c-138.24 0-250.88-112.64-250.88-250.88s112.64-250.88 250.88-250.88 250.88 112.64 250.88 250.88-112.64 250.88-250.88 250.88z m0-411.648c-89.088 0-160.768 71.68-160.768 160.768S244.736 686.08 333.824 686.08s160.768-71.68 160.768-160.768-71.68-161.792-160.768-161.792zM820.224 332.8c-76.8 0-140.288-62.464-140.288-140.288 0-76.8 62.464-140.288 140.288-140.288 76.8 0 140.288 62.464 140.288 140.288 0 76.8-62.464 140.288-140.288 140.288z m0-190.464c-27.648 0-50.176 22.528-50.176 50.176s22.528 50.176 50.176 50.176 50.176-22.528 50.176-50.176-22.528-50.176-50.176-50.176zM820.224 997.376c-33.792 0-65.536-12.288-91.136-33.792-28.672-24.576-45.056-58.368-48.128-95.232-3.072-36.864 9.216-73.728 33.792-101.376 24.576-28.672 58.368-45.056 95.232-48.128 76.8-6.144 144.384 52.224 150.528 129.024 6.144 76.8-52.224 144.384-129.024 150.528-4.096-1.024-7.168-1.024-11.264-1.024z m0-190.464h-4.096c-13.312 1.024-25.6 7.168-33.792 17.408-9.216 10.24-13.312 22.528-12.288 35.84 1.024 13.312 7.168 25.6 17.408 33.792 10.24 9.216 22.528 13.312 35.84 12.288 13.312-1.024 25.6-7.168 33.792-17.408 9.216-10.24 13.312-22.528 12.288-35.84-1.024-25.6-22.528-46.08-49.152-46.08z"
                                    fill="#ffffff" p-id="29884"></path><path
                                    d="M630.784 380.928c-13.312 0-26.624-5.12-36.864-15.36-9.216-10.24-15.36-22.528-15.36-36.864s5.12-26.624 15.36-36.864c12.288-12.288 29.696-17.408 47.104-14.336 3.072 1.024 6.144 2.048 10.24 3.072 3.072 1.024 6.144 3.072 9.216 5.12 3.072 2.048 5.12 4.096 8.192 6.144 9.216 9.216 15.36 22.528 15.36 36.864 0 3.072 0 7.168-1.024 10.24l-3.072 9.216c-1.024 3.072-3.072 6.144-5.12 9.216-2.048 3.072-4.096 5.12-6.144 8.192-2.048 2.048-5.12 4.096-8.192 6.144-3.072 2.048-6.144 3.072-9.216 5.12-3.072 1.024-6.144 2.048-10.24 3.072-3.072 0-6.144 1.024-10.24 1.024z"
                                    fill="#ffffff" p-id="29885"></path><path
                                    d="M631.808 768c-3.072 0-7.168 0-10.24-1.024-3.072-1.024-6.144-2.048-10.24-3.072-3.072-1.024-6.144-3.072-9.216-5.12-3.072-2.048-5.12-4.096-8.192-6.144-2.048-2.048-4.096-5.12-6.144-8.192-2.048-3.072-3.072-6.144-5.12-9.216-1.024-3.072-2.048-6.144-3.072-10.24-1.024-3.072-1.024-7.168-1.024-10.24 0-13.312 5.12-26.624 15.36-36.864 12.288-12.288 29.696-17.408 47.104-14.336 3.072 1.024 6.144 2.048 10.24 3.072 3.072 1.024 6.144 3.072 9.216 5.12 3.072 2.048 5.12 4.096 8.192 6.144 9.216 9.216 15.36 22.528 15.36 36.864 0 3.072 0 7.168-1.024 10.24-1.024 3.072-2.048 6.144-3.072 10.24-1.024 3.072-3.072 6.144-5.12 9.216-2.048 3.072-4.096 5.12-6.144 8.192-2.048 2.048-5.12 4.096-8.192 6.144-3.072 2.048-6.144 3.072-9.216 5.12-3.072 1.024-6.144 2.048-10.24 3.072-3.072 0-6.144 1.024-9.216 1.024z"
                                    fill="#ffffff" p-id="29886"></path></svg>
							</i>分享
                       </span>
        </div>
        <div class="aui-flex-box" onclick="ButtonEvent('history')">
                       <span class="aui-live-icon-nav" style="font-size: 0.75rem;">
                            <i><svg t="1570042262883" class="icon" viewBox="0 0 1024 1024" version="1.1"
                                    xmlns="http://www.w3.org/2000/svg" p-id="35759" width="64" height="64"><path
                                    d="M170.666667 682.666667h85.333333a42.666667 42.666667 0 0 1 0 85.333333H128a42.666667 42.666667 0 0 1-42.666667-42.666667V213.333333a42.666667 42.666667 0 0 1 42.666667-42.666666h768a42.666667 42.666667 0 0 1 42.666667 42.666666v512a42.666667 42.666667 0 0 1-42.666667 42.666667h-128a42.666667 42.666667 0 0 1 0-85.333333h85.333333V256H170.666667v426.666667z m243.498666 158.165333a42.666667 42.666667 0 1 1-60.330666-60.330667l128-128a42.666667 42.666667 0 0 1 60.330666 0l128 128a42.666667 42.666667 0 0 1-60.330666 60.330667L512 742.997333l-97.834667 97.834667z"
                                    p-id="35760" fill="#ffffff"></path></svg>
							</i>
							历史
                       </span>
        </div>

        <div class="aui-flex-box" id="StartPlayVideoOne" onclick="PlayButtonNav()">
            <span class="aui-live-icon-em" id="mute_state"> <!--开始观影吧！--></span>
            <span class="aui-live-icon-nav" style="font-size: 0.75rem;">
                            <i>
                          <svg t="1577041696012" class="icon" viewBox="0 0 1024 1024" version="1.1"
                               xmlns="http://www.w3.org/2000/svg" p-id="3792" width="64" height="64"><path
                                  d="M448 832v64l-128.32-128L448 640v64h192a192 192 0 0 0 115.84-345.152l0.704-0.896 90.24-90.24A320 320 0 0 1 640 832l-192.064 0.064zM576 192V128l131.008 128L576 384V320H384a192 192 0 0 0-115.712 345.216l-91.072 91.008A320 320 0 0 1 384 192h192.064z"
                                  p-id="3793" fill="#ffffff"></path></svg>
                            </i>
                换线
            </span>

        </div>
    </div>
</div>
</body>
<script type="text/javascript" src="../script/zepto.js"></script>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript">
    var browser;
    var play_url = '';
    var play_title = '';
    apiready = function () {
        title.innerHTML = '<i class="icon-svip"></i>' + api.pageParam.title;
        mute_state.innerHTML = api.pageParam.title;
        //系统返回键是否绑定
        if (localStorage.getItem('SystemReturnKeyBinding') == 1) {
            api.addEventListener({
                name: 'keyback'
            }, function (ret, err) {
                GoBack();
            });
        }
        browser = api.require('webBrowser');
        setTimeout(function () {		//延迟执行
            //上传播放记录
            U.Up_Play_Record(api.pageParam.beginurl, api.pageParam.title);
        }, 10000);


        api.addEventListener({
            name: 'myEvent'
        }, function (ret, err) {
            title.innerHTML = '<i class="icon-svip"></i>' + ret.value['title'];
            mute_state.innerHTML = ret.value['title'];
            browser.loadUrl({
                url: ret.value['url']
            });
            console.log('重新打开地址' + ret.value['url']);
        });
        var headerHeight = $('header').height();
        browser.openView({
            url: api.pageParam.url,
            progress: {
                color: "#1b7dff",	//加载进度条颜色，支持 rgb，rgba，#fff等，默认值#45C01A
                height: 1		 //进度条高度，默认值3，数字类型
            },
            rect: {
                x: 0,
                y: headerHeight,
                w: 'auto',
                h: 260,
            }
        });


    }

    /*
    //播放按钮 显示
        function PlayButtonShow(type){

            if(type == 1){

                var obj = document.getElementById("GoPlay");
                    obj.setAttribute("class", 'aui-pull-right display-block');

            }else{

                var obj = document.getElementById("GoPlay");
                    obj.setAttribute("class", 'display-none');
            }

        }

    */
    //导航播放按钮点击  切换线路
    function PlayButtonNav() {
        U.OpenVideoJxPopup(api.pageParam.primary_url, 1, api.pageParam.api_jx_url);
    }


    function portrait_up() {

        api.setScreenOrientation({
            orientation: 'portrait_up'
        });

    }


    //返回处理
    function GoBack() {

        api.setScreenOrientation({
            orientation: 'auto_portrait'
        });


        setTimeout(function () {		//延迟执行

            GoPageWork('Close')

        }, 500);

    }


    function Deliver() {

        U.OpenTouPingPopup(api.pageParam.api_jx_url, api.pageParam.video_name);
    }


    //页面处理
    function GoPageWork(name) {

        if (name == 'Back') {

            browser.historyBack(
                function (ret, err) {
                    if (!ret.status) {
                        api.closeWin();
                    }
                }
            );

        } else if (name == 'Close') {

            api.closeWin();


        } else if (name == 'Refresh') {

            location.reload();

        } else if (name == 'Gear') {

            U.openWin('my/', 'setlist');

        }


    }

    function ButtonEvent(name) {
        //升级会员
        if (name == 'sj') {
            //alert(JSON.stringify('升级会员'));
            // U.openWin('integral/', 'integral');
            api.openWin({
                name: 'integral',
                url: 'widget://html/integral/integral.html',
            });
        }
        //历史记录
        if (name == 'history') {
            //alert(JSON.stringify('升级会员'));
            //U.openWin('history/', 'videohistory');
            api.openWin({
                name: 'history',
                url: 'widget://html/history/videohistory.html',
            });
        }

        //分享
        if (name == 'Share') {
            // alert(JSON.stringify('分享'));
            //U.openWin('share/', 'share');
            api.openWin({
                name: 'share',
                url: 'widget://html/share/share.html',
            });
        }
    }
</script>
</html>
